package com.chain.BrotherExchange.data.model;

import com.chain.BrotherExchange.R;

import java.util.List;

public class CoinAssetsDetails extends BaseResponseModel<CoinAssetsDetails.DataBean> {


    public static class DataBean {
        /**
         * list : {"page_index":1,"page_size":10,"total_page":3,"total":29,"items":[{"trade_id":657382,"token_name":"ETH/SDC","opt":2,"num":"1","fee":"0.002","deal_time":1539685547},{"trade_id":657381,"token_name":"ETH/SDC","opt":1,"num":"1","fee":"0.002","deal_time":1539685547},{"trade_id":657380,"token_name":"ETH/SDC","opt":2,"num":"1","fee":"0.002","deal_time":1539685208},{"trade_id":657379,"token_name":"ETH/SDC","opt":1,"num":"1","fee":"0.002","deal_time":1539685208},{"trade_id":657378,"token_name":"ETH/SDC","opt":2,"num":"10","fee":"0.02","deal_time":1539682551},{"trade_id":657346,"token_name":"ETH/SDC","opt":2,"num":"1","fee":"0.002","deal_time":1539584509},{"trade_id":657345,"token_name":"ETH/SDC","opt":1,"num":"1","fee":"0.002","deal_time":1539584509},{"trade_id":657344,"token_name":"ETH/SDC","opt":2,"num":"10","fee":"0.02","deal_time":1539583559},{"trade_id":657343,"token_name":"ETH/SDC","opt":1,"num":"10","fee":"0.02","deal_time":1539583559},{"trade_id":657342,"token_name":"ETH/SDC","opt":2,"num":"10","fee":"0.02","deal_time":1539583557}]}
         */

        private ListBean list;

        public DataBean() {
        }

        public DataBean(ListBean list) {

            this.list = list;
        }

        public ListBean getList() {
            return list;
        }

        public void setList(ListBean list) {
            this.list = list;
        }

        public static class ListBean {
            /**
             * page_index : 1
             * page_size : 10
             * total_page : 3
             * total : 29
             * items : [{"trade_id":657382,"token_name":"ETH/SDC","opt":2,"num":"1","fee":"0.002","deal_time":1539685547},{"trade_id":657381,"token_name":"ETH/SDC","opt":1,"num":"1","fee":"0.002","deal_time":1539685547},{"trade_id":657380,"token_name":"ETH/SDC","opt":2,"num":"1","fee":"0.002","deal_time":1539685208},{"trade_id":657379,"token_name":"ETH/SDC","opt":1,"num":"1","fee":"0.002","deal_time":1539685208},{"trade_id":657378,"token_name":"ETH/SDC","opt":2,"num":"10","fee":"0.02","deal_time":1539682551},{"trade_id":657346,"token_name":"ETH/SDC","opt":2,"num":"1","fee":"0.002","deal_time":1539584509},{"trade_id":657345,"token_name":"ETH/SDC","opt":1,"num":"1","fee":"0.002","deal_time":1539584509},{"trade_id":657344,"token_name":"ETH/SDC","opt":2,"num":"10","fee":"0.02","deal_time":1539583559},{"trade_id":657343,"token_name":"ETH/SDC","opt":1,"num":"10","fee":"0.02","deal_time":1539583559},{"trade_id":657342,"token_name":"ETH/SDC","opt":2,"num":"10","fee":"0.02","deal_time":1539583557}]
             */

            private int page_index;
            private int page_size;
            private int total_page;
            private int total;
            private List<ItemsBean> items;

            public ListBean() {
            }

            public ListBean(List<ItemsBean> items) {

                this.items = items;
            }

            public int getPage_index() {
                return page_index;
            }

            public void setPage_index(int page_index) {
                this.page_index = page_index;
            }

            public int getPage_size() {
                return page_size;
            }

            public void setPage_size(int page_size) {
                this.page_size = page_size;
            }

            public int getTotal_page() {
                return total_page;
            }

            public void setTotal_page(int total_page) {
                this.total_page = total_page;
            }

            public int getTotal() {
                return total;
            }

            public void setTotal(int total) {
                this.total = total;
            }

            public List<ItemsBean> getItems() {
                return items;
            }

            public void setItems(List<ItemsBean> items) {
                this.items = items;
            }

            public static class ItemsBean {
                /**
                 * trade_id : 657382
                 * token_name : ETH/SDC
                 * opt : 2
                 * num : 1
                 * fee : 0.002
                 * deal_time : 1539685547
                 */

                private int trade_id;
                private String token_name;

                /**
                 * 1买 2卖
                 */
                private int opt;
                private String num;
                private String fee;
                private int deal_time;

                public ItemsBean() {
                }

                public ItemsBean(String token_name, int opt, String num, String fee, int deal_time) {

                    this.token_name = token_name;
                    this.opt = opt;
                    this.num = num;
                    this.fee = fee;
                    this.deal_time = deal_time;
                }

                public int getTrade_id() {
                    return trade_id;
                }

                public void setTrade_id(int trade_id) {
                    this.trade_id = trade_id;
                }

                public String getToken_name() {
                    return token_name;
                }

                public void setToken_name(String token_name) {
                    this.token_name = token_name;
                }

                public int getOpt() {
                    return opt;
                }

                public void setOpt(int opt) {
                    this.opt = opt;
                }

                public String getNum() {
                    return num;
                }

                public void setNum(String num) {
                    this.num = num;
                }

                public String getFee() {
                    return fee;
                }

                public void setFee(String fee) {
                    this.fee = fee;
                }

                public int getDeal_time() {
                    return deal_time;
                }

                public void setDeal_time(int deal_time) {
                    this.deal_time = deal_time;
                }

                public int getOptText() {
                    switch (opt) {
                        case 1:
                            return R.string.buying;
                        default:
                            return R.string.sale;
                    }
                }
            }
        }
    }
}
